<?php

namespace App\Http\Controllers\Admin;


use App\Models\ResourceType;
use App\Models\ResourceTypeExternal;
use App\Validate\ResourceTypeValidate;
use Illuminate\Support\Facades\DB;

/**
 * 数字资源类型管理（各资源商自己的类型）
 */
class ResourceTypeExternalController extends CommonController
{
    public $model = null;
    //  public $validate = null;

    public function __construct()
    {
        parent::__construct();

        //   $this->validate = new ResourceTypeValidate();
        $this->model = new ResourceTypeExternal();
    }

    /**
     * 类型(用于下拉框选择)
     * @param resource_business_id  资源商id  多个逗号拼接
     * @param big_type_id 系统大类id
     */
    public function filterList()
    {
        $resource_business_id = $this->request->resource_business_id;
        $big_type_id = $this->request->big_type_id;

        $res = $this->model->getFilterLists($resource_business_id, $big_type_id);
        if (empty($res)) {
            return $this->returnApi(203, '暂无数据');
        }
        return $this->returnApi(200, '获取成功', true, $res);
    }
}
